import request from '@/utils/request';
// 列表数据
export const dataList = (data: Object) => {
    return request({
        url: "/pc/goods/list",
        data: data,
        method: "post",
    });
};
// 新增编辑
export const dataAdd = (data: Object) => {
    return request({
        url: "/pc/goods/save",
        data: data,
        method: "post",
    });
};
// 删除
export const dataDel = (data: Object) => {
    return request({
        url: "/pc/goods/del",
        data: data,
        method: "post",
    });
};
// 上下架
export const dataState = (data: Object) => {
    return request({
        url: "/pc/goods/change",
        data: data,
        method: "post",
    });
};

// 文件上传
export const imageFile = async (formData: FormData, options?: any) => {
  return request('/pc/common/upload', {
    method: 'POST',
    data: formData,
    ...options,
  });
};